<%--
  同图号修理项目表
  Author: Ivan
--%>
<style type="text/css">
tr, th, td {
    text-align: center;
}
</style>

<div class="bjui-pageHeader">
    <form id="pagerForm" data-toggle="ajaxsearch" action="${request.getContextPath()}/Repairdrawing/repairdrawing" method="post">
        <div class="bjui-searchBar">
            <g:hiddenField name="SYS_QUERY_NAME" value="${SYS_QUERY_NAME}"/>
            <g:hiddenField name="EXPORT_CONTENT_NAME" value="Excel"/>
            %{--<label>开始日期<strong><span class="text-danger">*</span></strong>：</label>--}%
            %{--<input type="text" name="startTime" class="form-control" data-rule="required"--}%
                   %{--data-toggle="datepicker" data-pattern="yyyy-MM-dd"--}%
                   %{--size="11" id="start-date-input" readonly value="${startTime}"/>&nbsp;--}%
            %{--<label>结束日期<strong><span class="text-danger">*</span></strong>：</label>--}%
            %{--<input type="text" name="endTime" class="form-control" data-rule="required"--}%
                   %{--data-toggle="datepicker" data-pattern="yyyy-MM-dd"--}%
                   %{--size="11" id="end-date-input" readonly value="${endTime}"/>&nbsp;--}%
            <label>图号：</label>
            <g:textField name="figureName" value="${figureName}" size="17" placeholder="图号" />&nbsp;
            <button type="submit" class="btn-default" data-icon="search">查询</button>&nbsp;
            <a type="button" class="btn btn-blue" href="${request.getContextPath()}/Repairdrawing/expExcel"
               data-toggle="doexport" data-confirm-msg="确定要导出吗？" data-icon="file-excel-o" title="导出Excel">导出</a>
        </div>
    </form>
</div>

<div class="bjui-pageContent tableContent">
    <g:if test="${reportList.size() > 0}">
        <table data-toggle="tablefixed" data-width="100%" data-nowrap="true">
            <thead>
            <tr>
                <th width="50">NO.</th>
                <th width="150">图号</th>
                <th width="120">生产数</th>
                <th width="120">修正数</th>
                <g:each in="${unYieldDescList}" status="i" var="headInstance">
                    <th width="100">${headInstance.UN_YIELD_DESC}</th>
                </g:each>
            </tr>
            </thead>
            <tbody>
            <g:each in="${reportList}" status="i" var="dataInstance">
                <tr>
                    <td>${i + 1}</td>
                    <td>${dataInstance.FIGURE_NAME}</td>
                    <td>${dataInstance.IN_QTY}</td>
                    <td>${dataInstance.REVISE_QTY}</td>
                    <g:each in="${unYieldDescList}" status="j" var="headInstance">
                        <td>${dataInstance[headInstance.UN_YIELD_DESC]}</td>
                    </g:each>
                </tr>
            </g:each>
            <g:each in="${reportTotalList}" status="i" var="dataInstance">
                <tr>
                    <td colspan="2">${dataInstance.FIGURE_NAME}</td>
                    <td>${dataInstance.IN_QTY}</td>
                    <td>${dataInstance.REVISE_QTY}</td>
                    <g:each in="${unYieldDescList}" status="j" var="headInstance">
                        <td>${dataInstance[headInstance.UN_YIELD_DESC]}</td>
                    </g:each>
                </tr>
            </g:each>
            </tbody>
        </table>
    </g:if>
    <g:else>
        <g:render template="../template/emptyPanel"/>
    </g:else>
</div>
<g:render template="../template/unpagination"/>